#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
int bijiao(char arr[] ,char arr2[] ,int sz) {
	for (int o = 0; o < sz - 2; o++)
	{
		char tmp;
		tmp = arr[0];
		for (int n = 1; n < sz - 1; n++)
		{
			arr[n - 1] = arr[n];
		}
		arr[sz - 2] = tmp;
		if (strcmp(arr, arr2) == 0)
			return 1;
	}
	return 0;
}
int main()
{
	char arr[] = "abcdefg";
	char arr2[] = "efgabcd";
	int sz = sizeof(arr) / sizeof(arr[0]);
	printf("%d", bijiao(arr, arr2, sz));
}